package com.example.demo.entity.vo;

import com.example.demo.entity.ClassEntity;
import com.example.demo.entity.TeacherEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author xzy
 * @date 2020-11-23 10:00
 * 说明：教师-教师信息表
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class TeacherClassVO {
    /**
     * 教师ID
     */
    private String teacherId;
    /**
     * 教师编号
     */
    private String teacherNo;
    /**
     * 教师名称
     */
    private String teacherName;
    /**
     * 班级ID
     */
    private String classId;
    /**
     * 班级名称
     */
    private String className;

    public TeacherClassVO(TeacherEntity teacherEntity, ClassEntity classEntity) {
        if (teacherEntity != null) {
            this.teacherId = teacherEntity.getId();
            this.teacherNo = teacherEntity.getTeacherNo();
            this.teacherName = teacherEntity.getTeacherName();
        }

        if (classEntity != null) {
            this.classId = classEntity.getId();
            this.className = classEntity.getClassName();
        }
    }
}
